@echo off&color 02
for /f "tokens=2,*" %%i in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "AppData"') do (
set ffFav=%%j
)
@rem/ echo %ffFav%
@rem/ pause

dir "%ffFav%\*.default" /ad /s | findstr /c:".default" >temp.txt

for /f "tokens=3,*" %%i in (temp.txt) do (
set ffFav1=%%j
)
del /q/s temp.txt >nul

set "ffFav_HOME=%ffFav%\Mozilla\Firefox\Profiles\%ffFav1%\bookmarkbackups"
set ffFav=
set ffFav1=

if not exist "%ffFav%\." goto :lab_error

@rem/ echo Firefox Fav:[%ffFav%]

for /f "" %%i in ('dir "%ffFav_HOME%\bookmarks*" /OD /B') do (
set ffFav1=%%i
)
@rem/ echo Firefox Fav1:[%ffFav1%]

set "ffFav_file=%ffFav_HOME%\%ffFav1%"
set ffFav1=

if not exist "%ffFav_file%" goto :lab_error

echo Firefox Fav file:[%ffFav_file%]

goto :eof

:lab_error
echo Error !
goto :eof
